
Namespace DataStream
    ''' <summary>
    ''' This defines the public interface for loading run-time DLLs into BikiSoft
    ''' 
    ''' </summary>
    ''' <remarks></remarks>
    <ObfuscationAttribute(Exclude:=True, ApplyToMembers:=True)> _
    Public Interface IStreamRuntime
        Inherits IDisposable, INamed

        ''' <summary>
        ''' Standard Entry point for initialisation of control
        ''' </summary>
        ''' <returns>True if initialisation is successful</returns>
        ''' <remarks>This function should setup varialbes and paramaters and create
        ''' its own threads/process' to do any task requiring data processing. This will be called
        ''' once upon run time DLL loading</remarks>
        Function Initialise() As Boolean

        ''' <summary>
        ''' Standard subroutine to display a dialoge form for configuration of this control/object
        ''' </summary>
        ''' <remarks></remarks>
        Sub ShowDialogForm()

        ''' <summary>
        ''' Returns an appropriate logo used for configuration/display
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        ReadOnly Property Logo() As Icon

        ''' <summary>
        ''' Returns a description of the control
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        ReadOnly Property Description() As String

        ''' <summary>
        ''' Returns the version of the control
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        ReadOnly Property Version() As String

        ''' <summary>
        ''' Returns an array of menu items to display in BikiSoft
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        ReadOnly Property MenuItems() As Windows.Forms.ToolStripMenuItem()

        ''' <summary>
        ''' Returns all unhandled exceptions to BikiSoft for display.
        ''' </summary>
        ''' <param name="sender"></param>
        ''' <param name="e"></param>
        ''' <remarks></remarks>
        Event UnhandledException(ByVal sender As Object, ByVal e As System.EventArgs)

        ''' <summary>
        ''' Sends a message to the bottom status bar in BikiSoft, can specify 
        ''' warning/information and colour for display.
        ''' </summary>
        ''' <param name="sender"></param>
        ''' <param name="e"></param>
        ''' <remarks></remarks>
        Event DisplayMessage(ByVal sender As Object, ByVal e As DisplayMessageEventArgs)

        ''' <summary>
        ''' Add a control into BikiSoft
        ''' </summary>
        ''' <param name="sender"></param>
        ''' <param name="Control"></param>
        ''' <remarks></remarks>
        Event AddControl(ByVal sender As Object, ByVal Control As Object)

        ''' <summary>
        ''' Remove a control from BikiSoft
        ''' </summary>
        ''' <param name="sender"></param>
        ''' <param name="Control"></param>
        ''' <remarks></remarks>
        Event RemoveControl(ByVal sender As Object, ByVal Control As Object)


    End Interface

    Public Enum _eMsgSeverity
        eMsgNone
        eMsgInfo
        eMsgWarn
        eMsgErr
    End Enum

    ''' <summary>
    ''' Passes information back to BikiSoft for display
    ''' </summary>
    ''' <remarks></remarks>
    Public Class DisplayMessageEventArgs
        Inherits System.EventArgs

        Private m_Message As String = ""
        Private m_Colour As Color = Color.Transparent
        Private m_Severity As _eMsgSeverity = _eMsgSeverity.eMsgNone

        ''' <summary>
        ''' Raise a message with no colour
        ''' </summary>
        ''' <param name="Message">String to display</param>
        ''' <param name="Severity">Level of the mesasge, higher than None get a message box</param>
        ''' <remarks></remarks>
        Sub New(ByVal Message As String, Optional ByVal Severity As _eMsgSeverity = _eMsgSeverity.eMsgNone)
            m_Message = Message
            m_Colour = Color.Transparent
            m_Severity = Severity
        End Sub

        ''' <summary>
        ''' Raise a message with colour
        ''' </summary>
        ''' <param name="Message">String to display</param>
        ''' <param name="Colour">Colour user in bottom display</param>
        ''' <param name="Severity">Level of the message, higher than None get a message box</param>
        ''' <remarks></remarks>
        Sub New(ByVal Message As String, ByVal Colour As Color, Optional ByVal Severity As _eMsgSeverity = _eMsgSeverity.eMsgNone)
            m_Message = Message
            m_Colour = Colour
            m_Severity = Severity
        End Sub

        Public ReadOnly Property Message() As String
            Get
                Return m_Message
            End Get
        End Property

        Public ReadOnly Property Colour() As Color
            Get
                Return m_Colour
            End Get
        End Property

        Public ReadOnly Property Severity() As _eMsgSeverity
            Get
                Return m_Severity
            End Get
        End Property

    End Class
End Namespace
